<?php
namespace App\Utils;
class ConstantUtil{
    const INDEX_PAGE = 10;
    const PAGE_SHOW = 10;// 分页显示

    const GLOBAL_TRUE = 1;
    const GLOBAL_FALSE = 2;
    /**
     * USER
     */
    const USER_STATUS_TRUE = 1;
    const USER_STATUS_FALSE = 2;

    /**
     * user
     */
    const USER_ADMIN = 1;
    const USER_NORMAL = 5;

    /**
     * files
     */
    const FILES_TYPE_IMAGE  = 1;    // 图片类型
    const FILES_TYPE_FILE   = 2;    // 文件类型
    const FILES_TYPE_VIDEO  = 3;    // 视频类型

    /**
     * 审核中
     */
    const GLOBAL_SH_TRUE = 1;
    const GLOBAL_SH_FALSE = -1;
    const GLOBAL_SH_WAIT = 0;

    public static function getStatus($id=""){
        $array = [
            self::GLOBAL_TRUE => "启用" ,
            self::GLOBAL_FALSE => "禁用" ,
        ];
        if($id != '') return $array[$id];
        return $array;
    }

    public static function userPower(){
        return [1];
    }
    public static function getShStatus($id=""){
        $array = [
            self::GLOBAL_SH_TRUE    => "审核通过" ,
            self::GLOBAL_SH_WAIT    => "审核中" ,
            self::GLOBAL_SH_FALSE   => "审核驳回" ,
        ];
        if(strlen($id) > 0) return $array[$id];
        return $array;
    }

}